package com.duoketech.model.cart;
import com.duoketech.model.AbstractModel;
import com.duoketech.utils.PageUtil;

public class Cart extends AbstractModel<Cart>{
    public static final Cart dao = new Cart();

    public static final String ID = "id";//
    public static final String PRODUCT_ID = "product_id";//产品 id
    public static final String MEMBER_ID = "member_id";//会员 id
    public static final String STATUS = "status";//状态
    public static final String CREATE_TIME = "create_time";//创建时间
    public static final String MODIFY_TIME = "modify_time";//修改时间
    public static final String NUM = "num";//购买数量
    public static final String TOTAL_WEIGHT = "total_weight";//重量
    public static final String PRICE = "price";//单价
    public static final String TOTAL_PRICE = "total_price";//总价
    public static final String IS_POST = "is_post";// 是否包邮

    @Override
    public String tableName() {
        return "t_cart";
    }

    @Override
    public String status() {
        return null;
    }


    public String price(){
        return PageUtil.fengToYuan(getInt(PRICE))+"";
    }

    public String totalPrice(){
        return PageUtil.fengToYuan(getInt(TOTAL_PRICE))+"";
    }
}